<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>线下还款申请记录表 管理</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
            <div class="fieldset1 clearFix">
                <div class="fieldBox col_50">
                    <div class="label">支付表号</div>
                    <div class="field">
                        <input name="paySchNo" id="paySchNo" type="text" class="ui-textbox" value="">
                    </div>
                </div>
                <div class="fieldBox col_100" >
                    <div class="label">处理时间</div>
                    <div class="field">
                        <input name="stRecTm" id="stRecTm" type="text" class="ui-datepicker" value="">
                        <span>---</span>
                        <input name="endRecTm" id="endRecTm" type="text" class="ui-datepicker" value="">
                    </div>
                </div>

                <div class="clearFix"></div>
                <div class="btnsBox">
                    <span id="searchBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_1"></i>查询</span>
                    <span id="clearBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_19"></i>清空</span>
                    <span id="addBtn" class="sq-button sq-button-hasicon"><i class="sqBtnIco_3"></i>新增取消逾期</span>
                    <input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
                </div>
            </div>
        </form>
    </div>
    <div class="sqPanel" style="margin-bottom: 0;">
        <div class="sqPanel_body">
    		<div id="ligergrid1" class="sq-grid"></div>
        </div>
    </div>
</div>

<script type="text/javascript">
    var grid = null, menu = null;
    $(function () {
        grid = $("#ligergrid1").ligerGrid({
            url: '<%=path%>/ovdcancel/capOvdCancelLog/initList.do',
            method: 'get',
            columns: [
                {display: '主键ID', name: 'id', minWidth: 100, align: 'left', enabledSort: false},
                {display: '支付表号', name: 'paySchNo', minWidth: 100, align: 'left', enabledSort: false},
                {display: '支付表ID', name: 'paySchId', minWidth: 100, align: 'left', enabledSort: false},
                {display: '期次(多期逗号分隔)', name: 'payPds', minWidth: 100, align: 'left', enabledSort: false},
                {display: '处理时间', name: 'recTime', minWidth: 100, align: 'left', enabledSort: false,render:renderDate},
                {display: '处理人', name: 'recUsrId', minWidth: 100, align: 'left', enabledSort: false},
            ],
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            checkbox: true,
            rownumbers: true,
            allowUnSelectRow: true,
            alternatingRow: false,
            frozen:false
        });
        grid.setHeight(100);

        $("#searchBar").ligerForm();

        $("#pageloading").hide();

        /* 查询 */
        $("#searchBtn").click(function (event) {
            var form = liger.get("searchBar");
            var data = form.getData();
            for (name in data) {
                grid.setParm(name, data[name]);
            }
            grid.reload();
        });

        /* 清空 */
        $("#clearBtn").click(function (event) {
            $("#resetBtn").click();  //重置 input-text
            var form = liger.get("searchBar");
            form.setData({  //重置select等特殊表单
                "*Cd": " "
            });
        });
        
        var callback = function () {
            grid.reload();
        };


        /* 新增 */
        $("#addBtn").click(function (event) {
            $.ligerDialog.SQopen({
                width: 1150,
                height: 550,
                title: '新增取消逾期征信',
                url:'<%=path%>/ovdcancel/capOvdCancelLog/toAddPage.do'
            });
        });


    });

    //格式化时间
    function renderDate(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
        }
        return dateStr;
    }
</script>

</body>
</html>
